﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="zxx" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>Ayurvedic - Medical Template</title>

    <link rel="shortcut icon" type="image/x-icon" href="assets/images/cropped-favicon-32x32.png"/>

    <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>

    <link href="assets/css/style.css" rel="stylesheet" type="text/css"/>

    <link href="assets/css/plugin.css" rel="stylesheet" type="text/css"/>

    <link href="assets/css/dashboard.css" rel="stylesheet" type="text/css"/>

    <link href="assets/fonts/flaticon.css" rel="stylesheet" type="text/css"/>

    <link href="assets/css/icons.css" rel="stylesheet" type="text/css"/>

    <link rel="stylesheet" href="assets/fonts/line-icons.css" type="text/css"/>
    <link rel="stylesheet" href="common/font-awesome/css/font-awesome.min.css">
</head>
<body>

<div id="preloader">
    <div id="status"></div>
</div>


<div th:replace="common/common-bar::#header"></div>

<div id="dashboard">
    <div class="container">
        <div class="dashboard-main">
            <div class="row">
                <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
                    <div th:replace="common/common-bar::#dashboard-sidebar(cur='medicine')"></div>
                </div>
                <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
                    <div class="dashboard-content">
                        <div class="row mb-4">
                            <div class="col-lg-12 col-md-12 col-xs-12">
                                <div class="dashboard-list-box with-icons">
                                    <div class="dashboard-title">
                                        <h4 class="mb-0">全部药品 </h4>
                                        <p class="mb-0">共收集 [[${medicines.size()}]] 条药品信息。你可以继续<a href="/add-medical">新增药品</a>。
                                        </p>
                                    </div>
                                    <div class="table-responsive table-desi">
                                        <table class="basic-table table table-hover">
                                            <thead>
                                            <tr>
                                                <th>名称</th>
                                                <th>品牌</th>
                                                <th>类型</th>
                                                <th>价格</th>
                                                <th>更新时间</th>
                                                <th>操作</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr th:each="medicine:${medicines}">
                                                <td th:title="${medicine.medicineEffect}" th:text="${medicine.medicineName}"></td>
                                                <td th:text="${medicine.medicineBrand}"></td>
                                                <td>
                                                    <span th:if="${medicine.medicineType == 0}">西药</span>
                                                    <span th:if="${medicine.medicineType == 1}">中药</span>
                                                    <span th:if="${medicine.medicineType == 2}">中成药</span>
                                                </td>
                                                <td th:text="${medicine.medicinePrice}"></td>
                                                <td th:text="${#dates.format(medicine.updateTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                                                <td>
                                                    <a th:href="@{findMedicineOne(id=${medicine.id})}"><i
                                                            class="fa fa-eye text-info" aria-hidden="true"></i> </a>
                                                    <a th:href="@{add-medical(id=${medicine.id})}"><i
                                                            class="fa fa-pencil-square-o text-primary"
                                                            aria-hidden="true"></i> </a>
                                                    <a th:onclick="deleteMedicine([[${medicine.id}]])"
                                                       href="javascript:void(0)"><i class="fa fa-trash-o text-danger"
                                                                                    aria-hidden="true"></i> </a>
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<div th:replace="common/common-bar::#back"></div>

<div th:replace="common/common-bar::#footer"></div>

<div th:replace="common/common-bar::#search"></div>

<div th:replace="common/common-bar::#back-to-top"></div>

<script src="assets/js/jquery-3.5.1.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/plugin.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/custom-nav.js"></script>
<script src="assets/js/jpanelmenu.min.js"></script>
<script src="assets/js/dashboard-custom.js"></script>
<script src="common/utils/reg.js"></script>
<script src="common/layer/layer.js"></script>
<script src="common/custom.js"></script>
</body>
</html>
